﻿using StarryEdge.WPF.Lang;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace StarryEdge.WPF.Converter
{
    [ValueConversion(typeof(int), typeof(string))]
    public class NumberToPluginTypeConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            int i = System.Convert.ToInt32(value);
            switch (i)
            {
                case 1:
                    return "菜单";
                case 2:
                    return "业务";
                case 3:
                    return "数据源";
            }
            return LangManager.Instance.Lang["NoState"];
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
